<html>
<head><meta charset="utf-8"><title>polonius-graphviz · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html">polonius-graphviz</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="127202263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127202263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127202263">(May 28 2018 at 11:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> checking our understanding of the issue (graphviz <a href="https://github.com/rust-lang-nursery/polonius/issues/12" target="_blank" title="https://github.com/rust-lang-nursery/polonius/issues/12">https://github.com/rust-lang-nursery/polonius/issues/12</a>):<br>
- the output dump (when run with -v) should already contain all the info we need (but we’re still a bit fuzzy on the details here);<br>
- the graph structure is pre-determined by the cfg_edges;<br>
- we need to combine the two.</p>



<a name="127203116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127203116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127203116">(May 28 2018 at 12:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> this sounds roughly right, yes</p>



<a name="127203157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127203157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127203157">(May 28 2018 at 12:12)</a>:</h4>
<p>basically the cfg-edge gives the structure of the graph, which would mirrow the input control-flow graph</p>



<a name="127203161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127203161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127203161">(May 28 2018 at 12:12)</a>:</h4>
<p>but we can then display the input/output facts at each point</p>



<a name="127203494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127203494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127203494">(May 28 2018 at 12:22)</a>:</h4>
<p>++ thanks for the clarification</p>



<a name="127208214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127208214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127208214">(May 28 2018 at 14:31)</a>:</h4>
<p>Current graphviz output (with only borrow_regions as inputs): <a href="/user_uploads/4715/Oo1QGuBrWM8xb2Og6B53P6IR/graph.svg" target="_blank" title="graph.svg">graph.svg</a></p>



<a name="127239496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127239496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127239496">(May 29 2018 at 08:00)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="117911">@Yati Sagade</span>, I’m going to try and add support for the other input/output collections (probably via a Trait / the OutputDump trait)</p>



<a name="127240188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240188">(May 29 2018 at 08:21)</a>:</h4>
<p>Hey! sure, let me know when you push something to the branch.</p>



<a name="127240316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240316">(May 29 2018 at 08:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span>  The stuff currently being plotted, are they not just inputs? I see there's one borrow_live_at member in polonius_engine::facts::Output. Since that is the thing that is printed out it seems that contains the outputs per point.</p>



<a name="127240724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240724">(May 29 2018 at 08:34)</a>:</h4>
<p><span class="user-mention" data-user-id="117911">@Yati Sagade</span>  Yes, and only for borrow_region.</p>



<a name="127240728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240728">(May 29 2018 at 08:34)</a>:</h4>
<p>I just pushed a fix for the formatting.</p>



<a name="127240737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240737">(May 29 2018 at 08:34)</a>:</h4>
<p>I think you’re right, we need to look into <code>Output</code> for the outputs per point, possibly in a similar way as what we’re doing for inputs.</p>



<a name="127240799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240799">(May 29 2018 at 08:36)</a>:</h4>
<p>I’m writing a generic function that should be able to handle many/all of the tables (input and output), almost done.</p>



<a name="127240901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127240901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127240901">(May 29 2018 at 08:38)</a>:</h4>
<p>++</p>



<a name="127241513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127241513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127241513">(May 29 2018 at 08:54)</a>:</h4>
<p><span class="user-mention" data-user-id="117911">@Yati Sagade</span> pushed the new function: I have changed some things around so it may need some explanation.</p>



<a name="127241610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127241610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127241610">(May 29 2018 at 08:56)</a>:</h4>
<p>Checking now</p>



<a name="127241693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127241693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127241693">(May 29 2018 at 08:58)</a>:</h4>
<p>The meat is <code>facts_by_point</code>, which formats facts from a certain table (input/output), given:</p>
<ul>
<li>a <code>point</code> function that extracts <code>(Point, tuple of atoms)</code> from each point;</li>
<li>a <code>name</code> for formatting;</li>
<li>a <code>point_pos</code> that tells the formatter which atom is the “Point” (where to put the underscore)</li>
</ul>



<a name="127242011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242011">(May 29 2018 at 09:05)</a>:</h4>
<p>I've pushed a small patch to name the boxes after the points</p>



<a name="127242073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242073">(May 29 2018 at 09:06)</a>:</h4>
<p>Cool, thanks! (Sorry, I think I broke that while changing things)</p>



<a name="127242088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242088">(May 29 2018 at 09:07)</a>:</h4>
<p>Does the rest make sense?</p>



<a name="127242301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242301">(May 29 2018 at 09:13)</a>:</h4>
<p>No it was using indexes before. I think I get it now.<br>
Now we need to do inject the other relations in to inputs_by_point, and then figure out outputs. Right?</p>



<a name="127242415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242415">(May 29 2018 at 09:16)</a>:</h4>
<p>Yup! I can take care of injecting the other inputs. Are you up for taking a look at how to work on outputs?</p>



<a name="127242434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242434">(May 29 2018 at 09:17)</a>:</h4>
<p>Also I was wondering if it would make sense to have each relation even if there was nothing in that set at a given point, instead of the hyphen (or just not have the empty boxes with hyphens at all where applicable).</p>



<a name="127242436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242436">(May 29 2018 at 09:17)</a>:</h4>
<p>Yes, I can play with the outputs</p>



<a name="127242712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127242712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127242712">(May 29 2018 at 09:27)</a>:</h4>
<blockquote>
<p>Also I was wondering if it would make sense to have each relation even if there was nothing in that set at a given point, instead of the hyphen (or just not have the empty boxes with hyphens at all where applicable).</p>
</blockquote>
<p>We should probably hide them, yes. I was mostly being lazy with the logic there.</p>



<a name="127243485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243485">(May 29 2018 at 09:53)</a>:</h4>
<p>Pushed all inputs, and removed empty cells.</p>



<a name="127243491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243491">(May 29 2018 at 09:53)</a>:</h4>
<p>I added the borrow_live_at output: Does this make sense? <a href="/user_uploads/4715/jixcVlm_M1P1qSAI5JJI2BRQ/graph.svg" target="_blank" title="graph.svg">graph.svg</a></p>



<a name="127243536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243536">(May 29 2018 at 09:54)</a>:</h4>
<p>(will push the code if you think this is ok)</p>



<a name="127243633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243633">(May 29 2018 at 09:56)</a>:</h4>
<p>Yup! Looks good to me!</p>



<a name="127243667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243667">(May 29 2018 at 09:57)</a>:</h4>
<p>++ pushing now</p>



<a name="127243979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127243979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127243979">(May 29 2018 at 10:06)</a>:</h4>
<p>weird merge conflict, resolving and then pushing</p>



<a name="127244117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244117">(May 29 2018 at 10:10)</a>:</h4>
<p>Done. Produces something like that: <a href="/user_uploads/4715/wujU3291jvkSvv8lEHASpbMU/graph.svg" target="_blank" title="graph.svg">graph.svg</a></p>



<a name="127244166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244166">(May 29 2018 at 10:12)</a>:</h4>
<p>Did I mess up something you intended to have? I see that you had a flat_map on inputs_by_point, which I changed to a filter_map so we don't have spurious boxes.</p>



<a name="127244292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244292">(May 29 2018 at 10:17)</a>:</h4>
<p>Nice!</p>



<a name="127244332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244332">(May 29 2018 at 10:18)</a>:</h4>
<p>No, looks good. I think we made the same change in two slightly different ways.</p>



<a name="127244401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244401">(May 29 2018 at 10:20)</a>:</h4>
<p>I'll add the other outputs now</p>



<a name="127244410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244410">(May 29 2018 at 10:20)</a>:</h4>
<p>Could probably still use some refinement, but I think this is probably almost good to ship. <span class="user-mention" data-user-id="116009">@nikomatsakis</span> opinions? (the latest render posted by <span class="user-mention" data-user-id="117911">@Yati Sagade</span> is <a href="/user_uploads/4715/wujU3291jvkSvv8lEHASpbMU/graph.svg" target="_blank" title="graph.svg">graph.svg</a> )</p>



<a name="127244413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127244413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127244413">(May 29 2018 at 10:21)</a>:</h4>
<blockquote>
<p>I'll add the other outputs now</p>
</blockquote>
<p>Ah, right.</p>



<a name="127245141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245141">(May 29 2018 at 10:42)</a>:</h4>
<p>Ok pushed it. Let me know if you think that macro is a pain, and I'll just inline it</p>



<a name="127245150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245150">(May 29 2018 at 10:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>, <span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> <a href="/user_uploads/4715/poSpz3o88Pa90smy69mW3e6R/graph.svg" target="_blank" title="graph.svg">graph.svg</a></p>



<a name="127245191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245191">(May 29 2018 at 10:44)</a>:</h4>
<p>that's beatiful!</p>



<a name="127245268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245268">(May 29 2018 at 10:46)</a>:</h4>
<blockquote>
<p>Ok pushed it. Let me know if you think that macro is a pain, and I'll just inline it</p>
</blockquote>
<p>Cool! Let me do a bit of cleanup (I think we can avoid the loop by accepting any Iterator&lt;F&gt; in facts_by_point.</p>



<a name="127245422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245422">(May 29 2018 at 10:51)</a>:</h4>
<p>looking good! one nit: <code>region_live_at</code> is presently an input, not an output</p>



<a name="127245790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245790">(May 29 2018 at 11:00)</a>:</h4>
<p>Ah right, removed it.</p>



<a name="127245804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127245804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127245804">(May 29 2018 at 11:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span>  cool</p>



<a name="127246213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127246213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127246213">(May 29 2018 at 11:14)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span>  cool</p>
</blockquote>
<p>Pushed.</p>



<a name="127246281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127246281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127246281">(May 29 2018 at 11:16)</a>:</h4>
<blockquote>
<p>looking good! one nit: <code>region_live_at</code> is presently an input, not an output</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  The <code>region_live_at</code>s are expanded during evaluation, though, right? i.e. there will be more at the end: don’t we want to show those?</p>



<a name="127246395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127246395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127246395">(May 29 2018 at 11:20)</a>:</h4>
<p>Ah yes indeed, I see it is expanded after the analysis</p>



<a name="127246526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127246526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127246526">(May 29 2018 at 11:25)</a>:</h4>
<p><span class="user-mention" data-user-id="117912">@Janito Vaqueiro Ferreira Filho</span>  <a href="https://github.com/utaal/polonius" target="_blank" title="https://github.com/utaal/polonius">https://github.com/utaal/polonius</a> branch graphviz-output<br>
Example run: <code>cargo +nightly run --release -- --graphviz_file=graph.dot inputs/issue-47680/nll-facts/main</code>. To generate the graph, either paste it on an online graphviz tool, or if you have <code>dot</code> installed, <code>dot -o graph.svg -Tsvg graph.dot</code></p>



<a name="127247060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127247060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127247060">(May 29 2018 at 11:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> what do you mean expanded during evaluation ? IIRC there won't be new <code>region_live_at</code> produced by the computation; are you specifically talking about the bit of code that adds them to the output in "-v/dump_enabled" mode ? If so, I think this is more about dumping "more information" than it being absolutely required to be shown :)</p>



<a name="127248505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127248505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127248505">(May 29 2018 at 12:17)</a>:</h4>
<p>I think they mean the way that we add the universal regions to <code>region_live_at</code> — that's only a temp hack, but it's true that it is presently modified</p>



<a name="127249041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127249041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127249041">(May 29 2018 at 12:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="116852">@Andrea Lattuada</span>  So as it stands now, is it good to go to master?</p>



<a name="127249114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127249114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127249114">(May 29 2018 at 12:31)</a>:</h4>
<p>yes, seems like a great start</p>



<a name="127249243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127249243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127249243">(May 29 2018 at 12:34)</a>:</h4>
<p>++</p>



<a name="127249415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127249415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127249415">(May 29 2018 at 12:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> I've pushed a minor thing, if you are happy with what we have, I can squash our commits together so you can open a PR?</p>



<a name="127250074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127250074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127250074">(May 29 2018 at 12:54)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> I've pushed a minor thing, if you are happy with what we have, I can squash our commits together so you can open a PR?</p>
</blockquote>
<p>Sounds good!</p>



<a name="127250108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127250108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127250108">(May 29 2018 at 12:55)</a>:</h4>
<blockquote>
<p>I think they mean the way that we add the universal regions to <code>region_live_at</code> — that's only a temp hack, but it's true that it is presently modified</p>
</blockquote>
<p>Correct. (I don’t think I can claim I know what many of those mean: sorry for being imprecise there)</p>



<a name="127250780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127250780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127250780">(May 29 2018 at 13:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> pushed, I hope I have worded it right (still not 100% onboard with the terminology)</p>



<a name="127251136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251136">(May 29 2018 at 13:18)</a>:</h4>
<p>Cool! I’ll add you as co-author.</p>



<a name="127251280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251280">(May 29 2018 at 13:21)</a>:</h4>
<p>(Did you intend to squash all commits? Or was the intent to add a final commit? Either works, just checking what we should do there.)</p>



<a name="127251290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251290">(May 29 2018 at 13:21)</a>:</h4>
<p>I wante</p>



<a name="127251311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251311">(May 29 2018 at 13:22)</a>:</h4>
<p>*wanted to squash since otherwise the commits had quite terrible messages</p>



<a name="127251399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251399">(May 29 2018 at 13:23)</a>:</h4>
<p>Makes sense. It doesn’t look squashed on the branch, though, let me try and quickly fix that.</p>



<a name="127251600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251600">(May 29 2018 at 13:27)</a>:</h4>
<p>ouch indeed. I messed this one up. Just need to</p>



<a name="127251651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251651">(May 29 2018 at 13:28)</a>:</h4>
<p>*resquash and force push. sorry about that</p>



<a name="127251653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251653">(May 29 2018 at 13:28)</a>:</h4>
<p>Done, I think. Have a look and check it looks right. (you’ll need to reset)</p>



<a name="127251686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251686">(May 29 2018 at 13:29)</a>:</h4>
<p>That's perfect now</p>



<a name="127251688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251688">(May 29 2018 at 13:29)</a>:</h4>
<p>Thanks!</p>



<a name="127251785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127251785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrea Lattuada <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127251785">(May 29 2018 at 13:32)</a>:</h4>
<p>Thank you!</p>



<a name="127253292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz/near/127253292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yati Sagade <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/polonius-graphviz.html#127253292">(May 29 2018 at 14:05)</a>:</h4>
<p>We broke the build, should've rebased onto master before, I'll force push an amended commit</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>